home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / subeqn / subeqnarray.sty < prev   
Text File  |  1993-11-01  |  5KB  |  124 lines

  1. %% 
  2. %% This is file `subeqnarray.sty', generated on <1993/11/2> 
  3. %% with the docstrip utility (2.1e).
  4. %% 
  5. %% The original source file was `subeqnarray.doc'.
  6. %% 
  7. %% 
  8. %% IMPORTANT NOTICE:
  9. %% You are not allowed to distribute this file.
  10. %% For distribution of the original source see
  11. %% the copyright notice in the file subeqnarray.doc.
  12. %% 
  13. %%% ====================================================================
  14. %%%  @LaTeX-style-file{
  15. %%%     author          = "Braams J.L.",
  16. %%%     version         = "2.0",
  17. %%%     date            = "02 November 1993",
  18. %%%     time            = "15:06:16 MET",
  19. %%%     filename        = "subeqnarray.doc",
  20. %%%     address         = "PTT Research
  21. %%%                        St. Paulusstraat 4
  22. %%%                        2264 XZ Leidschendam
  23. %%%                        The Netherlands",
  24. %%%     telephone       = "(70) 3325051",
  25. %%%     FAX             = "(70) 3326477",
  26. %%%     checksum        = "23077 186 688 7602",
  27. %%%     email           = "J.L.Braams@research.ptt.nl (Internet)",
  28. %%%     codetable       = "ISO/ASCII",
  29. %%%     keywords        = "",
  30. %%%     supported       = "yes",
  31. %%%     abstract        = "This style option defines the subeqnarray
  32. %%%                        and subeqnarray* environments, which behave
  33. %%%                        like the eqnarray environment, except that
  34. %%%                        the lines are numbered like 1a 1b 1c etc.
  35. %%%                        To refer to these numbers an extra label
  36. %%%                        command \slabel has been defined
  37. %%%
  38. %%%                        The equations and their numbers adhere to
  39. %%%                        the standard LaTeX options leqno and fleqn.",
  40. %%%     docstring       = "The checksum field above contains a CRC-16
  41. %%%                        checksum as the first value, followed by the
  42. %%%                        equivalent of the standard UNIX wc (word
  43. %%%                        count) utility output of lines, words, and
  44. %%%                        characters.  This is produced by Robert
  45. %%%                        Solovay's checksum utility.",
  46. %%%  }
  47. %%% ====================================================================
  48. \def\fileversion{2.0}
  49. \def\filedate{02 November 1993}
  50. \def\docdate{22/12/1988}
  51. \wlog{Style option `subeqnarray' version \fileversion\space<\filedate> (JLB)}
  52. \wlog{English documentation\space\space\space<\docdate> (JLB)}
  53. \newcounter{subequation}[equation]
  54. \def\thesubequation{\theequation\@alph\c@subequation}
  55. \ifx\ds@leqno\undefined
  56.   \def\@subeqnnum{{\reset@font\rm (\thesubequation)}}
  57. \else
  58.   \def\@subeqnnum{\hbox to .01\p@{}\rlap{\reset@font\rm
  59.         \hskip -\displaywidth(\thesubequation)}}
  60. \fi
  61. \def\slabel#1{\@bsphack\if@filesw {\let\thepage\relax
  62.    \def\protect{\noexpand\noexpand\noexpand}%
  63.    \edef\@tempa{\write\@auxout{\string
  64.       \newlabel{#1}{{\thesubequation}{\thepage}}}}%
  65.    \expandafter}\@tempa
  66.    \if@nobreak \ifvmode\nobreak\fi\fi\fi\@esphack}
  67. \ifx\ds@fleqn\undefined
  68.   \def\subeqnarray{%
  69.     \stepcounter{equation}%
  70.     \let\@currentlabel=\theequation
  71.     \global\c@subequation\@ne
  72.     \global\@eqnswtrue\m@th
  73.     \global\@eqcnt\z@\tabskip\@centering\let\\\@subeqncr
  74.     $$\m@th\halign to \displaywidth
  75.      \bgroup\@eqnsel\hskip\@centering
  76.       $\displaystyle\tabskip\z@{##}$%
  77.       &\global\@eqcnt\@ne \hskip 2\arraycolsep \hfil${##}$\hfil
  78.       &\global\@eqcnt\tw@ \hskip 2\arraycolsep
  79.          $\displaystyle\tabskip\z@{##}$\hfil \tabskip\@centering
  80.       &\llap{##}\tabskip\z@\cr}
  81. \else
  82.   \def\subeqnarray{%
  83.     \stepcounter{equation}%
  84.     \let\@currentlabel=\theequation
  85.     \global\c@subequation\@ne
  86.     \global\@eqnswtrue\m@th
  87.     \global\@eqcnt\z@\tabskip\mathindent\let\\\@subeqncr
  88.     \abovedisplayskip\topsep
  89.     \ifvmode\advance\abovedisplayskip\partopsep\fi
  90.     \belowdisplayskip\abovedisplayskip
  91.     \belowdisplayshortskip\abovedisplayskip
  92.     \abovedisplayshortskip\abovedisplayskip
  93.     $$\m@th\halign to \linewidth
  94.      \bgroup\@eqnsel\hskip\@centering
  95.       $\displaystyle\tabskip\z@{##}$%
  96.       &\global\@eqcnt\@ne \hskip 2\arraycolsep \hfil${##}$\hfil
  97.       &\global\@eqcnt\tw@ \hskip 2\arraycolsep
  98.          $\displaystyle{##}$\hfil \tabskip\@centering
  99.       &\llap{##}\tabskip\z@\cr}
  100. \fi
  101. \def\endsubeqnarray{\@@subeqncr\egroup
  102.                      $$\global\@ignoretrue}
  103.  
  104. \def\@subeqncr{{\ifnum0=`}\fi\@ifstar{\global\@eqpen\@M
  105.     \@ysubeqncr}{\global\@eqpen\interdisplaylinepenalty \@ysubeqncr}}
  106.  
  107. \def\@ysubeqncr{\@ifnextchar [{\@xsubeqncr}{\@xsubeqncr[\z@]}}
  108.  
  109. \def\@xsubeqncr[#1]{\ifnum0=`{\fi}\@@subeqncr
  110.    \noalign{\penalty\@eqpen\vskip\jot\vskip #1\relax}}
  111.  
  112. \def\@@subeqncr{\let\@tempa\relax
  113.     \ifcase\@eqcnt \def\@tempa{& & &}\or \def\@tempa{& &}
  114.       \else \def\@tempa{&}\fi
  115.      \@tempa \if@eqnsw\@subeqnnum\refstepcounter{subequation}\fi
  116.      \global\@eqnswtrue\global\@eqcnt\z@\cr}
  117. \let\@ssubeqncr=\@subeqncr
  118. \@namedef{subeqnarray*}{\def\@subeqncr{\nonumber\@ssubeqncr}\subeqnarray}
  119. \@namedef{endsubeqnarray*}{\global\advance\c@equation\m@ne%
  120.                            \nonumber\endsubeqnarray}
  121. \endinput
  122. %% 
  123. %% End of file `subeqnarray.sty'.
  124.